package mornd.test6;

import org.springframework.boot.ApplicationContextFactory;
import org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext;

/**
 * @author: mornd
 * @dateTime: 2023/5/10 - 22:09
 * 函数式创建对象，参考 ApplicationContextFactory
 */
public class FunctionCreateTest {
    public static void main(String[] args) {
        System.out.println(A.b);
        System.out.println(A.b.create());
    }
}

interface A {
    A b = B::new;

    B create();
}


class B {}
